package com.tl.boot.entity.menu.form;

import com.tl.boot.common.enums.BooleanEnum;
import com.tl.boot.common.enums.ResultEnum;
import com.tl.boot.common.enums.StatusEnum;
import com.tl.boot.common.exception.BaseException;
import com.tl.boot.entity.demo.form.Base.BaseForm;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

/**
 * com.tl.boot.entity.menu.form -- UpdateMenuInfoForm
 * Description:
 * Created by joshua_liu <a href="mailto:joshualwork@163.com"></a>
 * On 2019/9/19 16:59
 */
public class UpdateMenuInfoForm extends BaseForm {
    @ApiModelProperty(value = "菜单id",name = "menuId",example = "1",dataType = "Long",required = true)
    private Long menuId;
    @ApiModelProperty( value = "菜单名称", name = "menuName", example = "权限管理" )
    private String menuName;
    @ApiModelProperty( value = "菜单编码", name = "menuCode", example = "11123" )
    private String menuCode;
    @ApiModelProperty( value = "菜单介绍", name = "menuContent", example = "权限管理内包含：" )
    private String menuContent;
    @ApiModelProperty( value = "父菜单id", name = "parentMenuId", example = "1" )
    private Long parentMenuId;
    @ApiModelProperty( value = "是否为叶子节点 TRUE 或 FALSE", name = "isLeafEnum", example = "TRUE" )
    private BooleanEnum isLeafEnum;
    @ApiModelProperty( value = "对应资源id", name = "resId", example = "3" )
    private Long resId;
    @ApiModelProperty( value = "菜单状态 VALID 或 INVALID", name = "menuStatusEnum", example = "INVALID" )
    private StatusEnum menuStatusEnum;
    @ApiModelProperty( value = "菜单所属系统编码", name = "belongSysno", example = "org123" )
    private String belongSysno;
    @ApiModelProperty( value = "菜单所属系统名称", name = "belongSysname", example = "河南信息工程部" )
    private String belongSysname;
    @ApiModelProperty( value = "备注", name = "remark", example = "备注信息" )
    private String remark;
    @ApiModelProperty( value = "扩展信息", name = "reserve", example = "扩展信息" )
    private String reserve;

    public Long getMenuId() {
        return menuId;
    }

    public void setMenuId(Long menuId) {
        this.menuId = menuId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getMenuCode() {
        return menuCode;
    }

    public void setMenuCode(String menuCode) {
        this.menuCode = menuCode;
    }

    public String getMenuContent() {
        return menuContent;
    }

    public void setMenuContent(String menuContent) {
        this.menuContent = menuContent;
    }

    public Long getParentMenuId() {
        return parentMenuId;
    }

    public void setParentMenuId(Long parentMenuId) {
        this.parentMenuId = parentMenuId;
    }

    public BooleanEnum getIsLeafEnum() {
        return isLeafEnum;
    }

    public void setIsLeafEnum(BooleanEnum isLeafEnum) {
        this.isLeafEnum = isLeafEnum;
    }

    public Long getResId() {
        return resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    public StatusEnum getMenuStatusEnum() {
        return menuStatusEnum;
    }

    public void setMenuStatusEnum(StatusEnum menuStatusEnum) {
        this.menuStatusEnum = menuStatusEnum;
    }

    public String getBelongSysno() {
        return belongSysno;
    }

    public void setBelongSysno(String belongSysno) {
        this.belongSysno = belongSysno;
    }

    public String getBelongSysname() {
        return belongSysname;
    }

    public void setBelongSysname(String belongSysname) {
        this.belongSysname = belongSysname;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getReserve() {
        return reserve;
    }

    public void setReserve(String reserve) {
        this.reserve = reserve;
    }

    @Override
    public void checkParam() {
        if (this.menuId == null|| StringUtils.isBlank(this.menuName)|| StringUtils.isBlank(this.menuCode)) {
            throw new BaseException(ResultEnum.REQUEST_PARAM_ILLEGAL);
        }
    }
}
